<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Amici</title>
</head>
<body>
<p>
   <a href="Home.html">Torna alla home</a>
   <a href="RicercaNonReg.html"> Ricerca</a>
</p>
<%
    int size = Integer.parseInt(request.getAttribute("size").toString());

    if(size == 0) {
    	
    	out.println(request.getAttribute("err"));
    	
    }
    else {
    	
    	out.println("<ul>");
    	
    	for(int i = 0; i < size; i++) {
    		
    		out.println("<li>");
    		out.println("<a href=\"VisualizzaProfiloServlet?username=" + request.getAttribute("el" + i) + "\">");
    		out.println(request.getAttribute("el" + i));
    		out.println("</a>");
    		out.println("</li>");
    		
    	}
    	
    	out.println("</ul>");
    	
    }
%>
</body>
</html>